import matplotlib.pyplot as plt

# 数据
quarters = ['Q1 2024', 'Q3 2024']
operating_revenue = [2065894745.9, 9145606838.66]
net_profit = [47296730.96, 406064712.90]
total_assets = [8000000000.0, 9000000000.0]  # 假设的总资产值，因为图中没有具体数值
total_liabilities = [1200000000.0, 1300000000.0]  # 假设的总负债值，因为图中没有具体数值

# 创建图表
fig, ax1 = plt.subplots()

# 绘制柱状图
ax1.bar(quarters, operating_revenue, color='skyblue', alpha=0.6, label='Operating Revenue')
ax1.bar(quarters, net_profit, color='green', alpha=0.6, label='Net Profit')

# 创建第二个y轴
ax2 = ax1.twinx()
ax2.plot(quarters, total_assets, 'r-o', label='Total Assets')
ax2.plot(quarters, total_liabilities, 'y-o', label='Total Liabilities')

# 添加标题和标签
ax1.set_title('Asset and Liability Structure Analysis')
ax1.set_xlabel('Quarter')
ax1.set_ylabel('Amount (Unit: RMB)')
ax2.set_ylabel('Assets and Liabilities (Unit: RMB)')

# 添加图例
fig.legend(loc='upper right', bbox_to_anchor=(1,1), bbox_transform=ax1.transAxes)

# 显示图表
plt.show()